<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    $router->resource('user', 'UserController'); //用户管理
    $router->resource('brand', 'BrandController'); //品牌管理
    $router->resource('store', 'StoreController'); //门店管理
    $router->resource('department', 'DepartmentController'); //部门管理
    $router->resource('position', 'PositionController'); //职位管理
    $router->resource('position-month-target', 'PositionMonthTargetController'); //职位月目标管理
    $router->resource('user-month-target', 'UserMonthTargetController'); //职工月目标管理
    $router->resource('salary-month', 'SalaryMonthController'); //职工月工资管理
    $router->resource('position-month-salary', 'PositionMonthSalaryController'); //岗位月工资管理

    $router->get('user-department', 'UserController@department');
    $router->get('user-position', 'UserController@position');
    $router->get('user-store', 'UserController@stores');
});

Route::get('user-probation-period-status', [\App\Admin\Controllers\UserController::class, 'probationPeriodStatus']);
